Last updated: 2021-11-22

Checks: 6 1

Knit directory: CarolineNCC1/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210920) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 3fe13ea. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    output/.DS_Store

Unstaged changes:
    Modified:   analysis/AnDis.Rmd
    Modified:   analysis/index.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/AnDis.Rmd) and HTML (docs/AnDis.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 3fe13ea LucianoRogerio 2021-11-22 Improvement for the layout of the website
html 3fe13ea LucianoRogerio 2021-11-22 Improvement for the layout of the website
Rmd 3ecd450 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
html 3ecd450 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
Rmd a5ffd57 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
html a5ffd57 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
Rmd 15bf4bb LucianoRogerio 2021-10-25 Fix and add link for the html pages
html 15bf4bb LucianoRogerio 2021-10-25 Fix and add link for the html pages
html 1fc7d3a LucianoRogerio 2021-10-25 Build site.
Rmd e880482 LucianoRogerio 2021-10-25 First Boxplot Graphs and Html pages

Boxplot de coleções nucleares - Características Quantitativas

Obter Dados Fenotípicos

Coleções nucleares - Dados Fenotipicos

suppressMessages(library(tidyverse)); suppressMessages(library(here)); suppressMessages(library(reshape2))
suppressMessages(library(reactable))

Method1 <- read.table(here::here("output", "DadosCCPheno1.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                    rep("numeric", times = 16)))
Method1$HCNMod <- as.factor(Method1$HCNMod)
Method1$DMCsg <- as.numeric(as.character(Method1$DMCsg))


Method2 <- read.table(here::here("output", "DadosCCPheno2.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method2$HCNMod <- as.factor(Method2$HCNMod)
Method2$DMCsg <- as.numeric(as.character(Method2$DMCsg))
colnames(Method2)[1] <- "Acessos"


Method3 <- read.table(here::here("output", "DadosCCPheno3.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method3$HCNMod <- as.factor(Method3$HCNMod)
Method3$DMCsg <- as.numeric(as.character(Method3$DMCsg))

Coleções Nucleares - dados Moleculares

Method4 <- read.table(here::here("output", "DadosCCGeno1.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                    rep("numeric", times = 16)))
Method4$HCNMod <- as.factor(Method4$HCNMod)
Method4$DMCsg <- as.numeric(as.character(Method4$DMCsg))


Method5 <- read.table(here::here("output", "DadosCCGeno2.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method5$HCNMod <- as.factor(Method5$HCNMod)
Method5$DMCsg <- as.numeric(as.character(Method5$DMCsg))


Method6 <- read.table(here::here("output", "DadosCCGeno3.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method6$HCNMod <- as.factor(Method6$HCNMod)
Method6$DMCsg <- as.numeric(as.character(Method6$DMCsg))

Method7 <- read.table(here::here("output", "DadosCCGeno4.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                    rep("numeric", times = 16)))
Method7$HCNMod <- as.factor(Method7$HCNMod)
Method7$DMCsg <- as.numeric(as.character(Method7$DMCsg))


Method8 <- read.table(here::here("output", "DadosCCGeno5.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method8$HCNMod <- as.factor(Method8$HCNMod)
Method8$DMCsg <- as.numeric(as.character(Method8$DMCsg))


Method9 <- read.table(here::here("output", "DadosCCGeno6.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method9$HCNMod <- as.factor(Method9$HCNMod)
Method9$DMCsg <- as.numeric(as.character(Method9$DMCsg))

Method10 <- read.table(here::here("output", "DadosCCGeno7.CSV"), header = T,
                       sep = ";", dec = ".",
                       colClasses = c(rep("factor", times = 36),
                                    rep("numeric", times = 16)))
Method10$HCNMod <- as.factor(Method10$HCNMod)
Method10$DMCsg <- as.numeric(as.character(Method10$DMCsg))


Method11 <- read.table(here::here("output", "DadosCCGeno8.CSV"), header = T,
                       sep = ";", dec = ".",
                      colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method11$HCNMod <- as.factor(Method11$HCNMod)
Method11$DMCsg <- as.numeric(as.character(Method11$DMCsg))


Method12 <- read.table(here::here("output", "DadosCCGeno9.CSV"), header = T,
                       sep = ";", dec = ".",
                       colClasses = c(rep("factor", times = 36),
                                     rep("numeric", times = 16)))
Method12$HCNMod <- as.factor(Method12$HCNMod)
Method12$DMCsg <- as.numeric(as.character(Method12$DMCsg))

Banco de Germoplasma de Mandioca da EMBRAPA Mandioca

AllBAG <- read.table(here::here("data", "DadosSelCaroline.CSV"), header = T,
                     sep = ",", dec = ".",
                     colClasses = c(rep("factor", times = 36),
                                    rep("numeric", times = 16)))
AllBAG$HCNMod <- as.factor(AllBAG$HCNMod)
AllBAG$DMCsg <- as.numeric(as.character(AllBAG$DMCsg))

Adicionar informações do Método e tipo de dados utilizados na seleção da Coleção Nuclear

AllBAG$Data <- rep("BAG", times = nrow(AllBAG))
AllBAG$Method <- rep("BAG", times = nrow(AllBAG))

Method1$Data <- rep("Pheno", times = nrow(Method1))
Method1$Method <- rep("GW/CH", times = nrow(Method1))

Method2$Data <- rep("Pheno", times = nrow(Method2))
Method2$Method <- rep("CH", times = nrow(Method2))

Method3$Data <- rep("Pheno", times = nrow(Method3))
Method3$Method <- rep("GW/MLST", times = nrow(Method3))

Method4$Data <- rep("Geno", times = nrow(Method4))
Method4$Method <- rep("MR/SH", times = nrow(Method4))

Method5$Data <- rep("Geno", times = nrow(Method5))
Method5$Method <- rep("CE/SH", times = nrow(Method5))

Method6$Data <- rep("Geno", times = nrow(Method6))
Method6$Method <- rep("MR/EH", times = nrow(Method6))

Method7$Data <- rep("Geno", times = nrow(Method7))
Method7$Method <- rep("CE/EH", times = nrow(Method7))

Method8$Data <- rep("Geno", times = nrow(Method8))
Method8$Method <- rep("MR/AC", times = nrow(Method8))

Method9$Data <- rep("Geno", times = nrow(Method9))
Method9$Method <- rep("CE/AC", times = nrow(Method9))

Method10$Data <- rep("Geno", times = nrow(Method10))
Method10$Method <- rep("AM/MLST", times = nrow(Method10))

Method11$Data <- rep("Geno", times = nrow(Method11))
Method11$Method <- rep("MR/MLST", times = nrow(Method11))

Method12$Data <- rep("Geno", times = nrow(Method12))
Method12$Method <- rep("CE/MLST", times = nrow(Method12))

Juntar todos os Dados das coleções nucleares e do BAG

Alldataset <- rbind(AllBAG, Method1, Method2, Method3,
                    Method4, Method5, Method6,
                    Method7, Method8, Method9,
                    Method10, Method11, Method12)

saveRDS(Alldataset, here::here("output", "AllDataCCCaroline.RDS"))

Preparar o data frame para fazer os boxplots

QualityTrait <- colnames(Alldataset)[2:36]


AlldataSetQuant <- Alldataset %>% select(-all_of(QualityTrait))
AlldataSetQuali <- Alldataset %>% select(Acessos, QualityTrait, Data, Method)
Note: Using an external vector in selections is ambiguous.
ℹ Use `all_of(QualityTrait)` instead of `QualityTrait` to silence this message.
ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
This message is displayed once per session.
AlldataSetQuant2 <- melt(AlldataSetQuant, id.vars = c("Acessos", "Data", "Method"),
       variable.name = "Trait", value.name = "Value")

Table 1. Formato da entrado do objeto para realizar o boxplot

AlldataSetQuant2$Data <- factor(AlldataSetQuant2$Data,
                                levels = c("BAG", "Pheno", "Geno"), ordered = T)
AlldataSetQuant2$Method <- factor(AlldataSetQuant2$Method,
                                levels = c("BAG", "GW/CH", "GW/MLST", "CH",
                                           "MR/SH", "MR/EH", "MR/AC", "MR/MLST",
                                           "CE/SH", "CE/EH", "CE/AC", "CE/MLST",
                                           "AM/MLST"),
                                ordered = T)
Remover os outliers
filter_lims <- function(x){
  l <- boxplot.stats(x)$stats[1]
  u <- boxplot.stats(x)$stats[5]

  for (i in 1:length(x)){
    x[i] <- ifelse(x[i]>l & x[i]<u, x[i], NA)
  }
  return(x)
}


AlldataSetQuant3 <- AlldataSetQuant2 %>% group_by(Trait, Method) %>%
  mutate(Value2 = filter_lims(Value))

Plotar o boxplot por conjunto de caracteres

Foliar <- c("RetFoliar", "ComprLobulo", "LargLobulo",
            "RelComprLar", "AltPl", "PPA",
            "ComprPeciolo")
Root <- c("FRY", "EspEntreCasca", "ComprMedRzs",
          "DiamMedRzs", "NRPl", "DMCsg", "IndColh")
Root2 <- c("FRYC", "FRYNC")

Fig 1. Boxplot das características morfológicas de parte aerea

Version Author Date
3fe13ea LucianoRogerio 2021-11-22

Fig 2. Boxplot das características morfológicas de raiz

Version Author Date
3fe13ea LucianoRogerio 2021-11-22

Fig 3. Boxplot das características morfológicas de raiz 2

Version Author Date
3fe13ea LucianoRogerio 2021-11-22

Barplot de coleções nucleares - Características Qualitativas

Preparar os dados qualitativos para plotar barplot
AlldataSetQuali2 <- melt(AlldataSetQuali, id.vars = c("Acessos", "Data", "Method"),
       variable.name = "Trait", value.name = "Value")
Warning: attributes are not identical across measure variables; they will be
dropped
AlldataSetQuali3 <- AlldataSetQuali2 %>% filter (!is.na(Value)) %>%
  group_by(Trait, Data, Method) %>% summarise(N = table(Value, useNA = "no"),
                                              Score = names(N)) %>%
  mutate(N = as.numeric(N))
`summarise()` has grouped output by 'Trait', 'Data', 'Method'. You can override using the `.groups` argument.
AlldataSetQuali3$Data <- factor(AlldataSetQuali3$Data,
                                levels = c("BAG", "Pheno", "Geno"), ordered = T)
AlldataSetQuali3$Method <- factor(AlldataSetQuali3$Method,
                                levels = c("BAG", "GW/CH", "GW/MLST", "CH",
                                           "MR/SH", "MR/EH", "MR/AC", "MR/MLST",
                                           "CE/SH", "CE/EH", "CE/AC", "CE/MLST",
                                           "AM/MLST"),
                                ordered = T)
AlldataSetQuali3$Score <- factor(AlldataSetQuali3$Score,
                                 levels = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
                                            30, 40, 45, 50, 60, 70, 80, 85, 90,
                                            95, 100, 105, 110, 115, 120, 130,
                                            140, 150, 160))

Table 2. Formato da entrado do objeto para realizar o barplot

Separar as características em grupos para plotar
traitsFolha <- levels(AlldataSetQuali3$Trait)[c(1:4, 8, 12:17, 20, 23)]
traitsCaule <- levels(AlldataSetQuali3$Trait)[c(5:7, 18:19, 21:22, 28, 32:34)]
traitsRaiz <- levels(AlldataSetQuali3$Trait)[c(9:11, 24:27, 29:31, 35)]

traitsFolha1 <- traitsFolha[c(1:5)]
traitsFolha2 <- traitsFolha[c(6, 8, 10, 13)]
traitsFolha3 <- traitsFolha[c(7, 9, 11:12)]

traitsCaule1 <- traitsCaule[c(1:3, 8:9)]
traitsCaule2 <- traitsCaule[c(4:7, 11)]
traitsCaule3 <- traitsCaule[c(10)]

traitsRaiz1 <- traitsRaiz[c(1:3, 5, 8:9)]
traitsRaiz2 <- traitsRaiz[c(4, 6:7, 10:11)]

Fig 4. Barplot para o primeiro grupo de características morfológicas do caule

Version Author Date
3fe13ea LucianoRogerio 2021-11-22

Fig 5. Barplot para o segundo grupo de características morfológicas do caule

Fig 6. Barplot para o terceiro grupo de características morfológicas do caule

Warning: Vectorized input to `element_text()` is not officially supported.
Results may be unexpected or may change in future versions of ggplot2.

Fig 7. Barplot para o primeiro grupo de características morfológicas foliares

Fig 8. Barplot para o segundo grupo de características morfológicas foliares

Fig 9. Barplot para o terceiro grupo de características morfológicas foliares

Fig 10. Barplot para o primeiro grupo de características morfológicas radiculares

Fig 11. Barplot para o segundo grupo de características morfológicas radiculares

Back - Coleções Nucleares Genotípicas

Next - Estimativas de Diversidade genética

Home


sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.6.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reactable_0.2.3 reshape2_1.4.4  here_1.0.1      forcats_0.5.1  
 [5] stringr_1.4.0   dplyr_1.0.7     purrr_0.3.4     readr_2.1.0    
 [9] tidyr_1.1.4     tibble_3.1.6    ggplot2_3.3.5   tidyverse_1.3.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7        lubridate_1.8.0   assertthat_0.2.1  rprojroot_2.0.2  
 [5] digest_0.6.28     utf8_1.2.2        reactR_0.4.4      plyr_1.8.6       
 [9] R6_2.5.1          cellranger_1.1.0  backports_1.3.0   reprex_2.0.1     
[13] evaluate_0.14     highr_0.9         httr_1.4.2        pillar_1.6.4     
[17] rlang_0.4.12      readxl_1.3.1      rstudioapi_0.13   whisker_0.4      
[21] jquerylib_0.1.4   rmarkdown_2.11    labeling_0.4.2    htmlwidgets_1.5.4
[25] munsell_0.5.0     broom_0.7.10      compiler_4.1.1    httpuv_1.6.3     
[29] modelr_0.1.8      xfun_0.28         pkgconfig_2.0.3   htmltools_0.5.2  
[33] tidyselect_1.1.1  workflowr_1.6.2   viridisLite_0.4.0 fansi_0.5.0      
[37] crayon_1.4.2      tzdb_0.2.0        dbplyr_2.1.1      withr_2.4.2      
[41] later_1.3.0       grid_4.1.1        jsonlite_1.7.2    gtable_0.3.0     
[45] lifecycle_1.0.1   DBI_1.1.1         git2r_0.29.0      magrittr_2.0.1   
[49] scales_1.1.1      cli_3.1.0         stringi_1.7.5     farver_2.1.0     
[53] fs_1.5.0          promises_1.2.0.1  xml2_1.3.2        bslib_0.3.1      
[57] ellipsis_0.3.2    generics_0.1.1    vctrs_0.3.8       tools_4.1.1      
[61] glue_1.5.0        crosstalk_1.2.0   hms_1.1.1         fastmap_1.1.0    
[65] yaml_2.2.1        colorspace_2.0-2  rvest_1.0.2       knitr_1.36       
[69] haven_2.4.3       sass_0.4.0